/**
 * Email ：huangyijia138@qq.com
 * Des：
 *
 * @description: w2
 * @author: huangjiajia
 * @create: 2025-01-23 14:12
 **/
public class Number2 {
    public void add() {
        System.out.println(this.getN1() + "+" + this.getN2() + "=" + (this.getN1() + this.getN2()));
    }


    public void sub() {
        System.out.println(this.getN1() + "-" + this.getN2() + "=" + (this.getN1() - this.getN2()));
    }

    private int n1;
    private int n2;

    public Number2() {

    }

    public Number2(int n1, int n2) {
        this.n1 = n1;
        this.n2 = n2;
    }

    public int getN1() {
        return n1;
    }

    public void setN1(int n1) {
        this.n1 = n1;
    }

    public int getN2() {
        return n2;
    }

    public void setN2(int n2) {
        this.n2 = n2;
    }
}




